package com.product.to;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
@Schema(title = "添加产品To")
public class AddProductTo {
    @NotNull(message = "产品名不能为空")
    @Schema(title = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String name;

    @NotBlank(message = "产品类型不能为空")
    @Schema(title = "产品类型", requiredMode = Schema.RequiredMode.REQUIRED)
    private String type;

    @Schema(title = "产品描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String description;
}
